package com.batchOperation.excel.OperationRecord;

import com.batchOperation.excel.OperationRecord.model.Record;
import com.batchOperation.tool.Response;

import java.util.List;
import java.util.Map;

/**
 * @Package: com.batchOperation.excel.OperationRecord
 * @ClassName: OperationRecord
 * @Author: wulongkai
 * @CreateTime: 2024/7/19 14:30
 * @Description:
 */
public interface OperationRecord {

    /**
     * 保存错误日志
     * @param executorId 操作Id
     * @param rowId      行
     * @param entity     类名
     * @param reason     失败原因
     */
    void save(Long executorId, Integer rowId, String entity, String reason);

    /**
     * 生成错误报告给前端
     * @param executorId 操作Id
     * @return
     */
    Response<Map<String, List<Record>>> report(Long executorId);
}
